<?php
/**
 * Description of SystemObject
 *
 * @author josema
 */
class SystemObject {
    protected $table;

    public $debug = false;

    protected $properties = array();

    public function  __get($name) {
        return key_exists($name, $this->properties) ? $this->properties[$name]: null;
    }

    public function  __set($name, $value) {
        $this->properties[$name] = $value;
    }

    public function toArray(){
        return $this->getAllProperties();
    }

    protected function getAllPropertyNames(){
        return array_keys($this->properties);
    }

    protected function getAllProperties(){
        return $this->properties;
    }
}
?>
